<template>
	<view>
		<view v-show="isShow" class="shuru-kuang-box">
			<view class="shuru-kuang">
				<input v-model="content" focus v-if="huifuname==''" class="shurukuang" type="text" placeholder="优质评论将会被优先展示" @blur="loseFocus" />
				<input v-model="content" focus v-else class="shurukuang" type="text" :placeholder="'回复'+huifuname" @blur="loseFocus" />
				<text @tap="toComment" class="fabu">发布</text>
			</view>

			<!-- <view class="zhuanfa-kuang">
				<view v-if="select===1" @tap.stop="zhuanFa(select)" class="sfZhuanfa"></view>
				<view v-else="select===2" @tap.stop="buzhuanFa(select)" class="sfZhuanfa select">
					<image src="../../../static/videoXiangQing/dagou.png"></image>
				</view>
				<text class="zhuanfa">转发</text>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		props: ["isShow","huifuname"],
		data() {
			return {
				select: 1,
				content: '',
			}
		},
		
		mounted:function(){
			
		},
		methods: {
			zhuanFa(select) {
				// this.select = 2; //点击转发按钮
				this.$emit('forward')
			},
			buzhuanFa(select) {
				// this.select = 1;
				this.$emit('nonForwarding')
			},
			loseFocus() {
				this.$emit('loseFocus')
			},
			toComment(content) {
				if (this.content == '') {
					uni.showToast({
						title: '请输入内容',
						icon: 'none'
					})
				} else {
					this.$emit('toComment', this.content);
				}
				this.content=''
			}
		}
	}
</script>

<style scoped>
	.shuru-kuang-box {
		width: 100%;
		height: 105upx;
		background-color: white;
		position: fixed;
		bottom: 0;
		z-index: 10000;
		border-top: 1upx solid #e7e7e7;
		padding-left: 40upx;
		padding-right: 40upx;
		box-sizing: border-box;
		padding-top: 17upx;
		padding-bottom: 30upx;
		border-bottom: 1upx solid #e7e7e7;
	}

	.shuru-kuang {
		justify-content: space-between;
		display: flex;
		text-align: left;
	}

	.zhuanfa-kuang {
		display: flex;
		margin-top: 30upx;
	}
	 input::-webkit-input-placeholder {
		 color: #bcbcbc;
	 }
	.shurukuang {
		width: 575upx;
		height: 65upx;
		font-size: 26upx;
		color:rgba(51,51,51,1);
		border: 1upx solid #cecece;
		line-height: 65upx;
		border-radius: 10upx;
		padding-left: 20upx;
	}

	.fabu {
		width: 75upx;
		height: 65upx;
		text-align: center;
		line-height: 65upx;
		font-size: 26upx;
		color: #666666;
	}

	.sfZhuanfa {
		width: 25upx;
		height: 25upx;
		border: 1upx solid #666666;
		border-radius: 7upx;
	}

	.sfZhuanfa.select {
		width: 28upx;
		height: 28upx;
		background-color: #007aff;
		justify-content: center;
		align-items: center;
		display: -webkit-flex;
		border: none;
	}

	.sfZhuanfa.select image {
		width: 17upx;
		height: 12upx;
	}

	.zhuanfa {
		font-size: 26upx;
		color: #666666;
		height: 25upx;
		line-height: 25upx;
		margin-left: 17upx;
	}
</style>
